<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: Arithm Operations on Matrices</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Arithm Operations on Matrices<div class="ingroups"><a class="el" href="../../d1/d1e/group__cuda.html">CUDA-accelerated Computer Vision</a> &raquo; <a class="el" href="../../d5/d8e/group__cudaarithm.html">Operations on Matrices</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html">cv::cuda::Convolution</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base class for convolution (or cross-correlation) operator. :  <a href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html">cv::cuda::DFT</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base class for <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a> operator as a <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">cv::Algorithm</a>. :  <a href="../../dc/de5/classcv_1_1cuda_1_1DFT.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2695e05ef624bf3ce03cfbda383a821d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html">Convolution</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#ga2695e05ef624bf3ce03cfbda383a821d">cv::cuda::createConvolution</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> user_block_size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>())</td></tr>
<tr class="memdesc:ga2695e05ef624bf3ce03cfbda383a821d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates implementation for <a class="el" href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html" title="Base class for convolution (or cross-correlation) operator. : ">cuda::Convolution</a> .  <a href="../../d9/d88/group__cudaarithm__arithm.html#ga2695e05ef624bf3ce03cfbda383a821d">More...</a><br /></td></tr>
<tr class="separator:ga2695e05ef624bf3ce03cfbda383a821d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f72d063b73c8bb995678525eb076f10"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html">DFT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#ga0f72d063b73c8bb995678525eb076f10">cv::cuda::createDFT</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> dft_size, int flags)</td></tr>
<tr class="memdesc:ga0f72d063b73c8bb995678525eb076f10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates implementation for <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">cuda::DFT</a>.  <a href="../../d9/d88/group__cudaarithm__arithm.html#ga0f72d063b73c8bb995678525eb076f10">More...</a><br /></td></tr>
<tr class="separator:ga0f72d063b73c8bb995678525eb076f10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadea99cb15a715c983bcc2870d65a2e78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#gadea99cb15a715c983bcc2870d65a2e78">cv::cuda::dft</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> dft_size, int flags=0, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:gadea99cb15a715c983bcc2870d65a2e78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix.  <a href="../../d9/d88/group__cudaarithm__arithm.html#gadea99cb15a715c983bcc2870d65a2e78">More...</a><br /></td></tr>
<tr class="separator:gadea99cb15a715c983bcc2870d65a2e78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42efe211d7a43bbc922da044c4f17130"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#ga42efe211d7a43bbc922da044c4f17130">cv::cuda::gemm</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src2, double alpha, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src3, double beta, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int flags=0, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:ga42efe211d7a43bbc922da044c4f17130"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs generalized matrix multiplication.  <a href="../../d9/d88/group__cudaarithm__arithm.html#ga42efe211d7a43bbc922da044c4f17130">More...</a><br /></td></tr>
<tr class="separator:ga42efe211d7a43bbc922da044c4f17130"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5704c25b8be4f19da812e6d98c8ee464"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#ga5704c25b8be4f19da812e6d98c8ee464">cv::cuda::mulAndScaleSpectrums</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int flags, float scale, bool conjB=false, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:ga5704c25b8be4f19da812e6d98c8ee464"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a per-element multiplication of two Fourier spectrums and scales the result.  <a href="../../d9/d88/group__cudaarithm__arithm.html#ga5704c25b8be4f19da812e6d98c8ee464">More...</a><br /></td></tr>
<tr class="separator:ga5704c25b8be4f19da812e6d98c8ee464"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3e8900d67c4f59bdc137a0495206cd8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#gab3e8900d67c4f59bdc137a0495206cd8">cv::cuda::mulSpectrums</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int flags, bool conjB=false, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:gab3e8900d67c4f59bdc137a0495206cd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a per-element multiplication of two Fourier spectrums.  <a href="../../d9/d88/group__cudaarithm__arithm.html#gab3e8900d67c4f59bdc137a0495206cd8">More...</a><br /></td></tr>
<tr class="separator:gab3e8900d67c4f59bdc137a0495206cd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga2695e05ef624bf3ce03cfbda383a821d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2695e05ef624bf3ce03cfbda383a821d">&#9670;&nbsp;</a></span>createConvolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html">Convolution</a>&gt; cv::cuda::createConvolution </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>user_block_size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Creates implementation for <a class="el" href="../../d4/d25/classcv_1_1cuda_1_1Convolution.html" title="Base class for convolution (or cross-correlation) operator. : ">cuda::Convolution</a> . </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">user_block_size</td><td>Block size. If you leave default value Size(0,0) then automatic estimation of block size will be used (which is optimized for speed). By varying user_block_size you can reduce memory requirements at the cost of speed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0f72d063b73c8bb995678525eb076f10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f72d063b73c8bb995678525eb076f10">&#9670;&nbsp;</a></span>createDFT()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html">DFT</a>&gt; cv::cuda::createDFT </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>dft_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Creates implementation for <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">cuda::DFT</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dft_size</td><td>The image size. </td></tr>
    <tr><td class="paramname">flags</td><td>Optional flags:<ul>
<li><b>DFT_ROWS</b> transforms each individual row of the source matrix.</li>
<li><b>DFT_SCALE</b> scales the result: divide it by the number of elements in the transform (obtained from dft_size ).</li>
<li><b>DFT_INVERSE</b> inverts <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a>. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).</li>
<li><b>DFT_COMPLEX_INPUT</b> Specifies that inputs will be complex with 2 channels.</li>
<li><b>DFT_REAL_OUTPUT</b> specifies the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gadea99cb15a715c983bcc2870d65a2e78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadea99cb15a715c983bcc2870d65a2e78">&#9670;&nbsp;</a></span>dft()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::dft </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>dft_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;&#160;</td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source matrix (real or complex). </td></tr>
    <tr><td class="paramname">dst</td><td>Destination matrix (real or complex). </td></tr>
    <tr><td class="paramname">dft_size</td><td>Size of a discrete Fourier transform. </td></tr>
    <tr><td class="paramname">flags</td><td>Optional flags:<ul>
<li><b>DFT_ROWS</b> transforms each individual row of the source matrix.</li>
<li><b>DFT_SCALE</b> scales the result: divide it by the number of elements in the transform (obtained from dft_size ).</li>
<li><b>DFT_INVERSE</b> inverts <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a>. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).</li>
<li><b>DFT_COMPLEX_INPUT</b> Specifies that input is complex input with 2 channels.</li>
<li><b>DFT_REAL_OUTPUT</b> specifies the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real. </li>
</ul>
</td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous version.</td></tr>
  </table>
  </dd>
</dl>
<p>Use to handle real matrices ( CV32FC1 ) and complex matrices in the interleaved format ( CV32FC2 ).</p>
<p>The source matrix should be continuous, otherwise reallocation and data copying is performed. The function chooses an operation mode depending on the flags, size, and channel count of the source matrix:</p>
<ul>
<li>If the source matrix is complex and the output is not specified as real, the destination matrix is complex and has the dft_size size and CV_32FC2 type. The destination matrix contains a full result of the <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a> (forward or inverse).</li>
<li>If the source matrix is complex and the output is specified as real, the function assumes that its input is the result of the forward transform (see the next item). The destination matrix has the dft_size size and CV_32FC1 type. It contains the result of the inverse <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a>.</li>
<li>If the source matrix is real (its type is CV_32FC1 ), forward <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a> is performed. The result of the <a class="el" href="../../dc/de5/classcv_1_1cuda_1_1DFT.html" title="Base class for DFT operator as a cv::Algorithm. : ">DFT</a> is packed into complex ( CV_32FC2 ) matrix. So, the width of the destination matrix is dft_size.width / 2 + 1 . But if the source is a single column, the height is reduced instead of the width.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#gadea99cb15a715c983bcc2870d65a2e78" title="Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix...">dft</a> </dd></dl>

</div>
</div>
<a id="ga42efe211d7a43bbc922da044c4f17130"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga42efe211d7a43bbc922da044c4f17130">&#9670;&nbsp;</a></span>gemm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::gemm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>beta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;&#160;</td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Performs generalized matrix multiplication. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>First multiplied input matrix that should have CV_32FC1 , CV_64FC1 , CV_32FC2 , or CV_64FC2 type. </td></tr>
    <tr><td class="paramname">src2</td><td>Second multiplied input matrix of the same type as src1 . </td></tr>
    <tr><td class="paramname">alpha</td><td>Weight of the matrix product. </td></tr>
    <tr><td class="paramname">src3</td><td>Third optional delta matrix added to the matrix product. It should have the same type as src1 and src2 . </td></tr>
    <tr><td class="paramname">beta</td><td>Weight of src3 . </td></tr>
    <tr><td class="paramname">dst</td><td>Destination matrix. It has the proper size and the same type as input matrices. </td></tr>
    <tr><td class="paramname">flags</td><td>Operation flags:<ul>
<li><b>GEMM_1_T</b> transpose src1</li>
<li><b>GEMM_2_T</b> transpose src2</li>
<li><b>GEMM_3_T</b> transpose src3 </li>
</ul>
</td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous version.</td></tr>
  </table>
  </dd>
</dl>
<p>The function performs generalized matrix multiplication similar to the gemm functions in BLAS level</p><ol type="1">
<li><p class="startli">For example, gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T) corresponds to</p>
<p class="formulaDsp">
\[\texttt{dst} = \texttt{alpha} \cdot \texttt{src1} ^T \cdot \texttt{src2} + \texttt{beta} \cdot \texttt{src3} ^T\]
</p>
</li>
</ol>
<dl class="section note"><dt>Note</dt><dd>Transposition operation doesn't support CV_64FC2 input type.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#ga42efe211d7a43bbc922da044c4f17130" title="Performs generalized matrix multiplication. ">gemm</a> </dd></dl>

</div>
</div>
<a id="ga5704c25b8be4f19da812e6d98c8ee464"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5704c25b8be4f19da812e6d98c8ee464">&#9670;&nbsp;</a></span>mulAndScaleSpectrums()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::mulAndScaleSpectrums </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>conjB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;&#160;</td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Performs a per-element multiplication of two Fourier spectrums and scales the result. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>First spectrum. </td></tr>
    <tr><td class="paramname">src2</td><td>Second spectrum with the same size and type as a . </td></tr>
    <tr><td class="paramname">dst</td><td>Destination spectrum. </td></tr>
    <tr><td class="paramname">flags</td><td>Mock parameter used for CPU/CUDA interfaces similarity, simply add a <code>0</code> value. </td></tr>
    <tr><td class="paramname">scale</td><td>Scale constant. </td></tr>
    <tr><td class="paramname">conjB</td><td>Optional flag to specify if the second spectrum needs to be conjugated before the multiplication. </td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous version.</td></tr>
  </table>
  </dd>
</dl>
<p>Only full (not packed) CV_32FC2 complex spectrums in the interleaved format are supported for now.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#gab3e8900d67c4f59bdc137a0495206cd8" title="Performs a per-element multiplication of two Fourier spectrums. ">mulSpectrums</a> </dd></dl>

</div>
</div>
<a id="gab3e8900d67c4f59bdc137a0495206cd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3e8900d67c4f59bdc137a0495206cd8">&#9670;&nbsp;</a></span>mulSpectrums()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::mulSpectrums </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>conjB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;&#160;</td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d4/d03/cudaarithm_8hpp.html">opencv2/cudaarithm.hpp</a>&gt;</code></p>

<p>Performs a per-element multiplication of two Fourier spectrums. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>First spectrum. </td></tr>
    <tr><td class="paramname">src2</td><td>Second spectrum with the same size and type as a . </td></tr>
    <tr><td class="paramname">dst</td><td>Destination spectrum. </td></tr>
    <tr><td class="paramname">flags</td><td>Mock parameter used for CPU/CUDA interfaces similarity. </td></tr>
    <tr><td class="paramname">conjB</td><td>Optional flag to specify if the second spectrum needs to be conjugated before the multiplication. </td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous version.</td></tr>
  </table>
  </dd>
</dl>
<p>Only full (not packed) CV_32FC2 complex spectrums in the interleaved format are supported for now.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d9/d88/group__cudaarithm__arithm.html#gab3e8900d67c4f59bdc137a0495206cd8" title="Performs a per-element multiplication of two Fourier spectrums. ">mulSpectrums</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
